<template>
  <el-breadcrumb separator="/">
    <el-breadcrumb-item :to="{ path: '/welcome' }">主页</el-breadcrumb-item>
    <el-breadcrumb-item :to="{ path: p.path }" v-for="p in newData">{{ p.meta.name }}</el-breadcrumb-item>
  </el-breadcrumb>
</template>
  
<script setup>
import emitter from '../../utils/bus';

import { ref, computed } from 'vue'
let dataRouter = ref([])

emitter.on("list", (datalist) => {
  dataRouter.value = datalist
})
let newData = computed(() => {
  return dataRouter.value.filter((p) => p.path !== "/")
})


</script>
  


